﻿<ResourceDictionary 
    x:Class="Giraffe.Client.ConversationModule.Resources.DataTemplateDictionary"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:ConversationModule="clr-namespace:Giraffe.Client.ConversationModule"
    xmlns:History="clr-namespace:Giraffe.Client.ConversationModule.History"
    xmlns:Answer="clr-namespace:Giraffe.Client.ConversationModule.Answer" 
    xmlns:Regions="clr-namespace:Microsoft.Practices.Composite.Presentation.Regions;assembly=Microsoft.Practices.Composite.Presentation">
    
    <DataTemplate DataType="{x:Type ConversationModule:ConversationVM}">
        <ConversationModule:ConversationControl Regions:RegionManager.RegionManager ="{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}, Mode=FindAncestor}, Path=(Regions:RegionManager.RegionManager)}"/>
    </DataTemplate>

    <DataTemplate DataType="{x:Type History:ConversationHistoryVM}">
        <History:ConversationHistoryControl/>
    </DataTemplate>
    
    <DataTemplate DataType="{x:Type History:MessageVM}">
        <History:MessageControl/>
    </DataTemplate>
    
    <DataTemplate DataType="{x:Type Answer:AnswerVM}">
        <Answer:AnswerControl/>
    </DataTemplate>
</ResourceDictionary>